package com.elinkway.infinitemovies.http.parser;

import com.elinkway.infinitemovies.bean.UpdatestreamBean;

import org.json.JSONObject;

/**
 * Created by wangyemin on 2015/12/14.
 */
public class UpdatestreamBeanParser extends LVideoMobileParser<UpdatestreamBean> {
    private static String STATUS = "status";
    private static String ISREPAIR = "isRepair";
    private static String CODE = "200";

    @Override
    public UpdatestreamBean parse(JSONObject data) throws Exception {
        UpdatestreamBean updatestreamBean = null;
        if (null != data && data.has(STATUS) && CODE.equalsIgnoreCase(data.getString(STATUS))) {
            updatestreamBean = new UpdatestreamBean();
            if (data.has(ISREPAIR))
                updatestreamBean.setIsRepair(data.getString(ISREPAIR));
        }
        return updatestreamBean;
    }
}


